import request from '@/utils/request'

// 查询从业人员预约列表
export function listReserve(query) {
  return request({
    url: '/health/reserve/list',
    method: 'get',
    params: query
  })
}

// 查询从业人员预约详细
export function getReserve(id) {
  return request({
    url: '/health/reserve/' + id,
    method: 'get'
  })
}

// 新增从业人员预约
export function addReserve(data) {
  return request({
    url: '/health/reserve',
    method: 'post',
    data: data
  })
}

// 新增自费从业人员预约
export function addSelfCostReserve(data) {
  return request({
    url: '/health/reserve/addSelfCostReserve',
    method: 'post',
    data: data
  })
}

// 修改从业人员预约
export function updateReserve(data) {
  return request({
    url: '/health/reserve',
    method: 'put',
    data: data
  })
}

// 删除从业人员预约
export function delReserve(id) {
  return request({
    url: '/health/reserve/' + id,
    method: 'delete'
  })
}

// 更改从业人员的发证状态
export function updateIsSendCard(ids) {
  return request({
    url: '/health/reserve/' + ids,
    method: 'put'
  })
}

// 下载健康证证件
export function downloadSendCard(id) {
  return request({
    url: '/health/reserve/downloadCard', // 后端接口地址
    method: 'post',
    params: { id }, // 传递参数
  })
}